#!/bin/sh
echo Starting application

source /etc/profile

PID=$(ps -ef | grep basis-gateway.jar | grep 'java' | awk '{ print $2 }')
if [ -z "$PID" ]; then
echo basis-gateway is already stopped
else
echo kill $PID
kill -9 $PID
fi

cd /opt/home/liujit/serve/
nohup java -jar basis-gateway.jar > basis-gateway.out 2>&1 &
echo start basis-gateway
